﻿using System.Web.Mvc;

namespace Web.Game
{
    public class GameAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Game";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            var nanespaces = new[] { "Web.Game.Controllers" };
            context.MapRoute(
                "GameArticle",
                "{param}/article/{id}.html",
                new { controller = "Game", action = "Article", param = UrlParameter.Optional }, nanespaces
            );
            context.MapRoute(
                "GameDefault",
                "{param}.html",
                new { controller = "Game", action = "Index", param = UrlParameter.Optional }, nanespaces
            );
        }
    }
}
